<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: orders_status.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

$orders_status = $db->db_query("SELECT
									orders_status_name,
									orders_status_id
								FROM
									".TABLE_ORDERS_STATUS."
								WHERE
									language_id = '".(int)$_SESSION['languages_id']."'
								ORDER BY
									orders_status_id ASC", true);
?>
<table width="100%" class="dataTable">
<?php
while(!$orders_status->EOF) {
	$op = $db->db_query("SELECT
								orders_id
							FROM
								".TABLE_ORDERS."
							WHERE
								orders_status = '".$orders_status->fields['orders_status_id']."'", true);

	echo '	<tr>
				<td>
					'.$orders_status->fields['orders_status_name'].'
				</td>
				<td align="center">
					'.$op->_numOfRows.'
				</td>
				<td width="1" align="right">
					'.($op->_numOfRows > 0 ? '<button type="button" onclick="window.location.href=\''.href_link('orders.php', 'status='.$orders_status->fields['orders_status_id']).'&'.getMenuID('orders').'\'" class="button">zeige</button>':'').'
				</td>
			</tr>';
	$orders_status->MoveNext();
}
?>
</table>